home *** CD-ROM | disk | FTP | other *** search
- Path: medtechnet.com!dreams!tony.johnston
- From: Tony.Johnston@dreams.medtechnet.com (Tony Johnston)
- Date: 13 Jan 96 23:09:00
- Newsgroups: comp.lang.c++
- Subject: If statements, HELP!!
- Message-ID: <956_9601132330@medtechnet.com>
- Organization: Med TechNet
-
- Can anyone see in this code fragment why this if statement wont do what
- I need it to do. Using Borland C++ 4.0:
-
-
- {
-
- if (SysopPercent > UserPercents) <--If this is true it should fall down
- { to the next if, if false it should
- go to the ELSE
- if (SysTime < LockTime) <--If true it should process its
- statement, if false it should fall
- down to the else
- TDDisplayFile("LOCK.ANS");
- }
- else
- TBDoors_Tmp.Open();
- TBDoors_Tmp.Read();
- TBDoors_Tmp.WhereTheDoorWasCalledFrom(5);
- TBDoors_Tmp.Write();
- TBDoors_Tmp.Close();
-
-
- }
-
- What is happening is that when the first IF is true it is falling to the
- next IF, but both If statements are ignoring the ELSE staement, I need it so
- that if the first IF is false it will go to the else amd if the second IF is
- false it also will go to the ELSE. I want to be able to use the same else
- for both IF's and cant get it to work, it just keeps bypassing the ELSE
- statement.
-
- Thanks,
- -=[ Tony ]=-
-
-